import { post, get, put, Delete, form } from "@/axios/http.js";
import { basicApi } from "@/api/index.js"
//模块数据
export default {
    namespaced: true,
    state: {},
    actions: {
        // 添加访客记录
        visitorAdd({}, params) {
            return post(basicApi.visitorAll.visitorAdd, params).then(res => {
                if(res.data.code == 200){
                    return res.data.result
                }else{
                    this._vm.$message.error(res.data.msg)
                }
            });
        },
        // 今日访客,id点击的用户id,或者自己的的id
        visitorPageToday({ commit },params){
            return post(basicApi.visitorAll.visitorPageToday, params).then(res=>{
                return res
            });
        },
        // 总的访客,id点击的用户id,或者自己的的id
        visitorPageTotal({ commit },params){
            return post(basicApi.visitorAll.visitorPageTotal, params).then(res=>{
                return res
            });
        },
        // 最新访客列表
        getVisitorList({ commit },params){
            return post(basicApi.visitorAll.getVisitorList, params).then(res=>{
                return res
            });
        },
        // getVisitorList({ commit },params){
        //     return get(basicApi.visitorAll.getVisitorList, params).then(res=>{
        //         return res
        //     });
        // },
    },
    mutations: {},
};
